J.G = {};
J.G.he = J.P.extend({
    pb: [J.ga, J.Nc],
    o: function(a, b) {
        this.$b = a;
        this.Qb = [3, 18];
        this.Cn = J.e.Cb(this);
        a && this.Hc(["opacity", "visible", "zIndex", "zooms"], a);
        this.l = b;
        this.D("display", b)
    },
    Z: function(a, b) {
        this.$b.k(a, b)
    },
    visibleChanged: function() {
        this.set("display", 0)
    },
    zIndexChanged: function() {
        this.set("display", 0)
    },
    Mq: function(a) {
        J.a.pg(a, this.opacity)
    },
    opacityChanged: function() {
        var a = this.get("opacity");
        this.opacity = Math.min(Math.max(0, a), 1);
        if (a = this.ka) if (a.length) for (var b = 0; b < a.length; b += 1) this.Mq(a[b]);
        else this.Mq(a)
    },
    vm: function() {
        var a = this.get("bounds");
        if (a) {
            if (a instanceof J.ec) {
                var b = a.Xh(),
                    c = a.cj(),
                    d = this.l.zb(new J.B(180, 0)).x,
                    f = this.l.zb(b),
                    g = this.l.zb(c),
                    h = this.l.get("center");
                b.r > c.r ? 0 < h.r ? g.x += d: f.x -= d: 0 < h.r ? (0 > b.r && (f.x += d), 0 > c.r && (g.x += d)) : (0 < b.r && (f.x -= d), 0 < c.r && (g.x -= d));
                this.g = [f.x, f.y, g.x, g.y]
            }
            a instanceof J.Fj && (this.g = [a.Za.x, a.Za.y, a.Bb.x, a.Bb.y]);
            return this.g
        }
        return null
    }
});
function rb(a, b, c) {
    this.z = a;
    this.x = b;
    this.y = c
}
rb.prototype.gb = function() {
    return new rb(this.z, this.x, this.y)
};
rb.prototype.toString = function() {
    return [this.z, this.x, this.y].join("/")
};
J.De = function(a, b) {
    this.ma = a;
    this.key = a.toString();
    this.url = b
};
J.Ce = rb;
J.G.De = J.G.he.extend({
    o: function(a, b) {
        arguments.callee.Ja.apply(this, arguments);
        this.D("tileSize", a);
        this.D("tiles", a);
        this.Hc(["zooms", "type", "detectRetina", "tileFun", "errorUrl"], a);
        this.D("lang", b);
        var c = "overlayer" === a.get("type");
        this.jf = !c && !J.f.aa;
        if (J.f.vc || J.f.MK) this.jf = !1;
        var d = b.get("size"),
            d = d.width * d.height / 65536;
        J.f.la && J.f.aa && 9 < d && (this.jf = !1);
        this.lf = !c;
        this.mf = !c;
        this.D("reload", a)
    },
    langChanged: function() {
        this.set("reload")
    },
    reloadChanged: function() {
        this.set("display", 0)
    },
    tileFunChanged: function() {
        this.set("reload")
    },
    ag: function() {
        return {
            ib: this.get("tileSize"),
            visible: this.get("visible"),
            g: this.vm(),
            Qb: this.get("zooms"),
            cm: this.jf,
            lf: this.lf,
            mf: this.mf,
            opacity: this.get("opacity"),
            te: this.get("tileFun"),
            la: this.get("detectRetina") && J.f.la && J.f.aa
        }
    },
    Qg: function(a) {
        if (J.L.wb.If) return new J.L.wb.If(this, a)
    }
});
J.G.nc = J.G.he.extend({
    o: function(a, b) {
        this.map = b;
        this.vi = 0;
        this.We = !1;
        this.Bf = this.Af = 0;
        this.jj = [];
        arguments.callee.Ja.apply(this, arguments);
        this.fi = [];
        this.Jd = new J.G.tr;
        a && (this.D("style", a), this.OG = a.get("stable") || !1, this.D("dataSources", a), this.D("bubble", a));
        this.D("display", b);
        this.Vy()
    },
    ag: function() {
        return {
            visible: this.get("visible"),
            Qb: this.get("zooms"),
            opacity: this.get("opacity"),
            zIndex: this.get("zIndex"),
            cC: this.$b.get("alwaysRender") || !1
        }
    },
    dataSourcesChanged: function() {
        var a = this.get("dataSources");
        a && ("string" === typeof a ? (new J.$.ia(a)).c("complete",
            function(a) {
                this.uw(a.data);
                this.Sh = a.data;
                this.We = !0;
                this.set("display");
                this.$b.k("complete")
            },
            this) : a.length && (this.uw(a), this.Sh = a, this.We = !0, this.set("display"), this.$b.k("complete")))
    },
    getDatas: function() {
        return this.Sh
    },
    jH: function() {
        if (this.$b.cg) {
            var a = this.Zm;
            this.Af = a.size.width + a.anchor.x;
            this.Bf = a.size.height + a.anchor.y
        }
    },
    Z: function(a, b) {
        var c = {
            type: a,
            data: "mouseout" === a ? this.Rz || null: b.Ul.eb,
            target: this.$b
        };
        this.Rz = "mouseout" === a ? null: b.Ul.eb;
        this.$b.k(a, c)
    },
    aI: function() {},
    Ma: function(a) {
        this.Z(a.type, a)
    },
    Vy: function() {
        this.c("click", this.Ma);
        this.c("dblclick", this.Ma);
        this.c("mousedown", this.Ma);
        this.c("mouseup", this.Ma);
        this.c("mouseover", this.Ma);
        this.c("mouseout", this.Ma);
        this.c("touchstart", this.Ma);
        this.c("touchend", this.Ma)
    },
    eI: function() {
        this.A("click", this.Ma);
        this.A("dblclick", this.Ma);
        this.A("mousedown", this.Ma);
        this.A("mouseup", this.Ma);
        this.A("mouseover", this.Ma);
        this.A("mouseout", this.Ma);
        this.A("touchstart", this.Ma);
        this.A("touchend", this.Ma)
    },
    styleChanged: function() {
        this.Zm = this.get("style");
        this.jH();
        this.set("display", 0)
    },
    uw: function(a) {
        if (a) {
            this.clear();
            for (var b = this.map.get("resolution", 18), c = 0; c < a.length; c += 1) {
                var d = a[c].lnglat;
                a[c].lnglat = J.e.ca(d);
                d = this.map.zb(d, 18, b);
                d = new J.ge({
                    name: "point-" + J.e.Cb(this),
                    ta: new J.R.fd([d.x, d.y], !0)
                });
                d.Ih = this;
                d.eb = a[c];
                this.Yt(d)
            }
        }
    },
    gv: function(a) {
        if ("geojson" === a) return new J.iy({
            map: this.map
        });
        if ("topjson" === a) return new J.OH({
            map: this.map
        });
        if ("subway" === a) return new J.LH({
            map: this.map
        })
    },
    GF: function(a) {
        if (a) {
            var b = [],
                b = [],
                c = {};
            if (a.rules) {
                for (var b = a.rules,
                         d = 0,
                         f = b.length; d < f; d += 1) {
                    for (var g = [], h = b[d].symbolizers, k = 0, l = h.length; k < l; k += 1) h[k].fill && (g[k] = new J.style.mc.ur(h[k].fill)),
                    h[k].stroke && (g[k] = new J.style.mc.Kr(h[k].stroke));
                    h = g;
                    b[d].an = h;
                    b[d] = new J.style.uy(b[d])
                }
                c.rules = b
            }
            if (a.symbolizers) {
                b = a.symbolizers;
                a = 0;
                for (d = b.length; a < d; a += 1) b[a].fill && (b[a] = new J.style.mc.ur(b[a].fill)),
                b[a].stroke && (b[a] = new J.style.mc.Kr(b[a].stroke));
                c.an = b
            }
            a = new J.xn(c)
        } else a = new J.xn({});
        this.set("style", a);
        return a
    },
    dI: function(a, b) {
        if ( - 1 === J.e.indexOf(a, J.m.Ka)) {
            var c = new J.$.ia(a);
            c.c("complete",
                function(c) {
                    c = this.Jc[a] = this.gv(b).Iw(c);
                    this.Ti(c);
                    this.Z("complete")
                },
                this);
            c.c("error", this.xa, this)
        } else(new J.$.XMLHttpRequest(a)).c("complete",
            function(c) {
                c = eval("(" + c.data + ")");
                c = this.Jc[a] = this.gv(b).Iw(c);
                this.Ti(c)
            },
            this)
    },
    OF: function(a) {
        a.li > this.gg && (this.gg = a.li)
    },
    Yt: function(a) {
        this.Jd.add(a);
        if (!this.pm && !this.$b.cg) {
            0 === a.name.indexOf("circle") && (a.c("rad", this.OF, this), this.gg || (this.gg = a.get("radius")), a.li > this.gg && (this.gg = a.get("radius")));
            var b = a.get("strokeWeight") || 0;
            if (!this.ij || b > this.ij) this.ij = b
        }
        this.OG || a.D("feature", this, !0)
    },
    Ti: function(a) {
        this.We = !0;
        for (var b = 0,
                 c = a.length; b < c; b += 1) this.Yt(a[b])
    },
    clear: function() {
        this.We = !0;
        this.Jd.clear()
    },
    Ue: function(a) {
        var b;
        return 0 > a[0] ? (b = [a[0] + J.e.Sa, a[1], J.e.Sa, a[3]], a = [0, a[1], a[2], a[3]], b = this.Jd.Ue(b), a = this.Jd.Ue(a), J.extend(b, a)) : a[2] > J.e.Sa ? (b = [a[0], a[1], J.e.Sa, a[3]], a = [0, a[1], a[2] - J.e.Sa, a[3]], b = this.Jd.Ue(b), a = this.Jd.Ue(a), J.extend(b, a)) : this.Jd.Ue(a)
    },
    ZI: function(a) {
        var b, c = this.get("style"),
            d = a.ee;
        c instanceof J.xn || (c = this.GF(c));
        if (d && 0 < d.length) b = c.Eu(d, a);
        else {
            if (c.Zw.length || c.ee.length) b = c.$C(a);
            b || (b = a.JD())
        }
        return b
    },
    lv: function(a) {
        function b(a, b) {
            return a.sm - b.sm
        }
        var c = [],
            d,
            f,
            g,
            h,
            k,
            l = {};
        for (d in a) if (a.hasOwnProperty(d)) {
            g = a[d];
            h = g.get("zIndex");
            for (f in l) if (l.hasOwnProperty(f) && (k = c[l[f]][2], k === h)) break;
            "undefined" === typeof l[h] && (c.push([[], [], h]), l[h] = c.length - 1);
            h = c[l[h]];
            h[0].push(g)
        }
        c.sort(this.KG);
        a = 0;
        for (d = c.length; a < d; a += 1) c[a][0].sort(b);
        return c
    },
    featureChanged: function(a) {
        this.We = !0;
        var b = a.target,
            c = b.ta;
        0 !== this.Jd.MD([J.e.Cb(b)]).length && (this.Jd.remove(b, a.gi), c && !a.fD && this.Jd.add(b))
    },
    Jw: function(a) {
        this.We = !0;
        for (var b, c = 0,
                 d = a.length; c < d; c += 1) b = a[c],
            b.ta.gi = null,
            b.Ug(!0),
            b.el("feature")
    },
    oK: function(a, b) {
        return a[1].zIndex === b[1].zIndex ? J.e.Cb(a[1]) - J.e.Cb(b[1]) : a[1].zIndex - b[1].zIndex
    },
    KG: function(a, b) {
        return a[2] - b[2]
    },
    gK: function(a) {
        return a.cJ() === J.G.QH.JH
    },
    Qg: function(a) {
        return this.pm ? new J.L.Xg.nh(this, a) : J.f.Gk && J.L.canvas.nh ? new J.L.canvas.nh(this, a) : J.L.wb.nh && !J.f.jw ? new J.L.wb.nh(this, a) : null
    }
});
J.G.tr = J.P.extend({
    o: function() {
        this.clear()
    },
    clear: function() {
        this.Yh = [];
        this.zq = new J.je
    },
    add: function(a) {
        var b = J.e.Cb(a),
            c = a.ta;
        this.Yh[b] || (this.count += 1, this.Yh[b] = a, c && !J.g.xb(c.Ub(), [Infinity, Infinity, -Infinity, -Infinity]) && this.zq.yE(c.Ub(), a))
    },
    WI: function() {
        return this.Yh
    },
    Ue: function(a) {
        return this.zq.vG(a)
    },
    MD: function(a) {
        var b = a.length,
            c = [],
            d;
        for (d = 0; d < b; d += 1) this.Yh[a[d]] && c.push(this.Yh[a[d]]);
        return c
    },
    remove: function(a, b) {
        var c = J.e.Cb(a).toString(),
            d = a.ta;
        this.Yh[c] && (delete this.Yh[c], d && (c = "undefined" !== typeof b ? b: d.Ub(), this.zq.remove(c, a)))
    }
});
function sb(a, b, c) {
    this.url = a;
    this.Yd = b;
    this.av = c;
    this.Vf = this.Eq = !1
}
function tb(a, b) {
    var c = ub;
    return function() {
        return c.call(this, a, b)
    }
}
function ub(a, b) {
    a.LI = +new Date;
    a.loaded = b;
    clearTimeout(a.ZG);
    var c = a.TE;
    c.kg.remove(a.url) && c.Sz();
    c = a.DE ? a.Jc: a.ya;
    a.Jc = null; (b || a.av) && a.Yd(b ? c: null, a);
    a.Hv ? (a.Hv.nk(), a.Hv = null) : c && (c.onload = null, c.onerror = null, c.onabort = null, a.ya = null)
}
J.xr = J.P.extend({
    UH: "assets/image/blank.gif",
    o: function(a, b, c) {
        this.timeout = b || 15E3;
        this.ki = new J.ed(1024);
        this.kg = new J.ed(1024);
        this.Cu = a;
        this.Tu = c
    },
    ls: function(a) {
        a && this.kg.count >= this.Cu && (a = this.kg.Va.pa.value, a.Vf && (this.kg.remove(a.url), this.cs(a)));
        for (; this.ki.count && !(this.kg.count >= this.Cu);) this.mz(this.ki.shift())
    },
    Sz: function() {
        if (!this.ns) {
            this.ns = !0;
            var a = this;
            setTimeout(function() {
                    a.ns = !1;
                    a.ls()
                },
                0)
        }
    },
    mz: function(a) {
        var b = document.createElement("img");
        b.src = a.url;
        a.ya = b;
        a.TE = this;
        a.startTime = +new Date;
        a.Eq = !0;
        b.complete ? ub(a, !0) : (this.kg.set(a.url, a), b.onload = tb(a, !0), b.onerror = tb(a, !1), b.onabort = tb(a, !1), a.ZG = setTimeout(tb(a, !1), this.timeout))
    },
    cs: function(a) {
        a.Eq && (ub(a, !1), a.Vf = !0, a.hI = !0)
    },
    CJ: function(a, b, c) {
        return this.Mv(a.url, b, c, !0, a.ma.z + "_" + a.ma.x + "_" + a.ma.y)
    },
    Mv: function(a, b, c, d, f) {
        var g = this.kg.get(a);
        if (g && g.Vf) g.Vf = !1,
            g.Yd = b,
            g.av = c;
        else {
            g = new sb(a, b, c);
            g.DE = d;
            g.key = f;
            if (this.ki.get(J.e.Cb(g))) return;
            this.ki.set(J.e.Cb(g), g);
            this.ls(!0)
        }
        return g
    },
    yC: function(a) {
        a.Vf || (a.Vf = !0, this.ki.remove(J.e.Cb(a)))
    },
    clear: function(a) {
        this.ki.forEach(function(a) {
            a.Vf = !0
        });
        this.ki.clear();
        if (a) for (; a = this.kg.pop();) this.cs(a);
        else this.kg.forEach(function(a) {
            a.Vf = !0
        })
    }
});
var vb = function() {
    function a(a) {
        this.zn[J.e.Cb(a)] = a;
        return this
    }
    function b(a) {
        delete this.zn[J.e.Cb(a)];
        return this
    }
    return function() {
        function c() {
            var a = c.zn,
                b, g = [],
                h;
            for (h in a) Object.prototype.hasOwnProperty.call(a, h) && g.push(a[h]);
            for (a = g.length - 1; 0 <= a; a -= 1) h = g[a].apply(this, arguments),
            void 0 !== h && (b = h);
            return b
        }
        c.zn = {};
        c.iI = a;
        c.ZJ = b;
        return c
    }
} ();
J.ed = J.P.extend({
    o: function(a, b) {
        this.zh = a | 0;
        this.Ln = !!b;
        this.count = 0;
        this.mF = vb();
        this.clear()
    },
    ej: function() {
        return ! this.count
    },
    rJ: function() {
        return this.count >= this.zh
    },
    jK: function(a) {
        this.zh !== a && (this.zh = a | 0) && this.Ot(this.zh)
    },
    get: function(a, b) {
        var c = this.xs(a);
        return c ? c.value: b
    },
    set: function(a, b) {
        var c = this.xs(a);
        c ? c.value = b: (c = new J.ed.kh(a, b), this.l[a] = c, this.Es(c), this.count += 1)
    },
    remove: function(a) {
        return Object.prototype.hasOwnProperty.call(this.l, a) ? (this.ak(this.l[a]), !0) : !1
    },
    forEach: function(a, b) {
        for (var c = this.Va.next; c !== this.Va; c = c.next) a.call(b, c.value, c.key, this)
    },
    mj: function(a, b) {
        return Object.prototype.hasOwnProperty.call(this.l, a) ? this.l[a].value: b
    },
    RJ: function() {
        return this.Va.next.value
    },
    SJ: function() {
        return this.Va.pa.value
    },
    shift: function() {
        return this.vt(this.Va.next)
    },
    push: function(a) {
        a = new J.ed.kh("", a);
        0 === this.count ? (this.Va.pa = null, a.pa = this.Va, this.Va.next = a) : (this.Tl.next = a, a.pa = this.Tl);
        this.count += 1;
        this.Tl = a
    },
    cr: function(a) {
        a = new J.ed.kh("", a);
        0 === this.count ? (this.Va.pa = null, a.pa = this.Va, this.Tl = this.Va.next = a) : (this.Va.next.pa = a, a.next = this.Va.next, a.pa = this.Va, this.Va.next = a);
        this.count += 1
    },
    fF: function() {
        if (this.count) {
            this.count -= 1;
            var a = this.Va.next;
            a.next ? (a.next.pa = this.Va, this.Va.next = a.next) : (this.Va.next = null, this.Tl = this.Va.pa = null);
            a.next = null;
            a.pa = null;
            return a.value
        }
        return null
    },
    pop: function() {
        return this.vt(this.Va.pa)
    },
    xs: function(a) {
        if (Object.prototype.hasOwnProperty.call(this.l, a)) return a = this.l[a],
        this.Ln && (a.remove(), this.Es(a)),
            a
    },
    Es: function(a) {
        this.Ln ? (a.next = this.Va.next, a.pa = this.Va, this.Va.next = a, a.next.pa = a) : (a.pa = this.Va.pa, a.next = this.Va, this.Va.pa = a, a.pa.next = a);
        this.zh && this.Ot(this.zh)
    },
    Ot: function(a) {
        for (var b = this.count; b > a; b -= 1) {
            var c = this.Ln ? this.Va.pa: this.Va.next;
            this.ak(c);
            this.mF(c.value)
        }
    },
    ak: function(a) {
        a.remove();
        delete this.l[a.key];
        this.count -= 1
    },
    vt: function(a) {
        this.Va !== a && this.ak(a);
        return a.value
    },
    clear: function() {
        this.l = {};
        this.Va = new J.ed.kh("", null);
        this.Va.pa = this.Va.next = this.Va;
        this.count = 0
    }
});
J.ed.kh = function(a, b) {
    this.key = a;
    this.value = b
};
J.ed.kh.prototype.pa = null;
J.ed.kh.prototype.next = null;
J.ed.kh.prototype.remove = function() {
    this.pa.next = this.next;
    this.next.pa = this.pa;
    this.next = this.pa = null
};
J.ly = J.P.extend({
    pb: [J.ga],
    o: function(a) {
        this.Bi = J.extend({
                size: 120,
                px: 0.7,
                Wu: 2,
                ox: 300
            },
            a);
        this.Ee = {};
        this.Jf = 0;
        this.En = this.Bi.size
    },
    Py: function(a) {
        return {
            il: a,
            So: J.e.yk(),
            $l: 0
        }
    },
    get: function(a, b) {
        if (!this.yb(a)) return b;
        var c = this.Ee[a];
        c.So = J.e.yk();
        c.$l += 1;
        return c.il
    },
    mj: function(a, b) {
        return this.get(a, b)
    },
    set: function(a, b) {
        this.yb(a) ? this.Ee[a].il = b: (this.Jf += 1, this.Ee[a] = this.Py(b));
        this.Jf > this.En && this.Qy()
    },
    yb: function(a) {
        return this.Ee.hasOwnProperty(a)
    },
    gl: function(a) {
        if (!this.yb(a)) return null;
        this.Jf -= 1;
        var b = this.Ee[a];
        delete this.Ee[a];
        return b.il
    },
    clear: function() {
        this.An();
        this.Ee = {};
        this.Jf = 0
    },
    An: function() {
        this.Fn && clearTimeout(this.Fn)
    },
    Qy: function() {
        if (this.Jf > this.En * this.Bi.Wu) this.An(),
            this.as();
        else if (! (10 > J.e.yk() - this.Ry)) {
            this.An();
            var a = this;
            this.Fn = setTimeout(function() {
                    a.Fn = null;
                    a.as()
                },
                this.Bi.ox);
            this.Ry = J.e.yk()
        }
    },
    as: function() {
        var a = Math.round(this.En * this.Bi.px);
        if (! (this.Jf < a)) for (var a = this.Ly(this.Jf - a), b, c, d = 0, f = a.length; d < f; d += 1) b = a[d],
            c = this.gl(b),
            this.k("drop", {
                key: b,
                il: c
            })
    },
    Iy: function(a, b) {
        var c = this.Ee[a],
            d = this.Ee[b],
            f = c.So - d.So;
        return 0 !== f ? f: c.$l - d.$l
    },
    Ly: function(a) {
        var b = [],
            c;
        for (c in this.Ee) this.Ee.hasOwnProperty(c) && b.push(c);
        return this.My(b, a, this.Iy)
    },
    My: function(a, b, c) {
        if (0 >= b) return [];
        for (var d = 0,
                 f = a.length - 1,
                 g, h, k; d < f;) {
            g = d;
            h = f;
            for (k = a[b]; g <= b && h >= b;) {
                for (; g <= b && 0 > c.call(this, a[g], k);) g += 1;
                for (; h >= b && 0 < c.call(this, a[h], k);) h -= 1;
                var l = a[g];
                a[g] = a[h];
                a[h] = l;
                g += 1;
                h -= 1
            }
            h < b && (d = g);
            g > b && (f = h)
        }
        return a.slice(0, b)
    }
});
J.je = J.P.extend({
    o: function(a) {
        this.Rv = "undefined" !== typeof a ? a: 6;
        this.Fm = Math.floor(this.Rv / 2);
        this.Pm = {
            g: [Infinity, Infinity, -Infinity, -Infinity],
            ha: []
        };
        this.count = 0
    },
    JC: function(a, b) {
        var c = -1,
            d = [],
            f;
        d.push(b);
        var g = b.ha;
        do { - 1 !== c && (d.push(g[c]), g = g[c].ha, c = -1);
            for (var h = g.length - 1; 0 <= h; h -= 1) {
                var k = g[h];
                if ("undefined" !== typeof k.ai) {
                    c = -1;
                    break
                }
                var l = J.je.wj(k.g[2] - k.g[0], k.g[3] - k.g[1], k.ha.length + 1),
                    k = J.je.wj((k.g[2] > a.g[2] ? k.g[2] : a.g[2]) - (k.g[0] < a.g[0] ? k.g[0] : a.g[0]), (k.g[3] > a.g[3] ? k.g[3] : a.g[3]) - (k.g[1] < a.g[1] ? k.g[1] : a.g[1]), k.ha.length + 2);
                if (0 > c || Math.abs(k - l) < f) f = Math.abs(k - l),
                    c = h
            }
        } while ( - 1 !== c );
        return d
    },
    yE: function(a, b, c) {
        a = {
            g: a,
            ai: b
        };
        "undefined" !== typeof c && (a.type = c);
        this.zv(a, this.Pm);
        this.count += 1
    },
    zv: function(a, b) {
        var c;
        if (0 === b.ha.length) b.g = J.g.gb(a.g),
            b.ha.push(a);
        else {
            var d = this.JC(a, b),
                f = a;
            do {
                if (c && "undefined" !== typeof c.ha && 0 === c.ha.length) {
                    var g = c;
                    c = d.pop();
                    for (var h = 0,
                             k = c.ha.length; h < k; h += 1) if (c.ha[h] === g || 0 === c.ha[h].ha.length) {
                        c.ha.splice(h, 1);
                        break
                    }
                } else c = d.pop();
                g = f instanceof Array;
                if ("undefined" !== typeof f.ai || "undefined" !== typeof f.ha || g) {
                    if (g) {
                        g = 0;
                        for (h = f.length; g < h; g += 1) J.g.extend(c.g, f[g].g);
                        c.ha = c.ha.concat(f)
                    } else J.g.extend(c.g, f.g),
                        c.ha.push(f);
                    c.ha.length <= this.Rv ? f = {
                        g: J.g.gb(c.g)
                    }: (f = g = this.OE(c.ha), 1 > d.length && (c.ha.push(g[0]), d.push(c), f = g[1]))
                } else J.g.extend(c.g, f.g), f = {
                    g: J.g.gb(c.g)
                }
            } while ( 0 < d . length )
        }
    },
    OE: function(a) {
        for (var b = this.IF(a); 0 < a.length;) this.JF(a, b[0], b[1]);
        return b
    },
    IF: function(a) {
        for (var b = a.length - 1,
                 c = 0,
                 d = a.length - 1,
                 f = 0,
                 g = a.length - 2; 0 <= g; g -= 1) {
            var h = a[g];
            h.g[0] > a[c].g[0] ? c = g: h.g[2] < a[b].g[1] && (b = g);
            h.g[1] > a[f].g[1] ? f = g: h.g[3] < a[d].g[3] && (d = g)
        }
        Math.abs(a[b].g[2] - a[c].g[0]) > Math.abs(a[d].g[3] - a[f].g[1]) ? b > c ? (b = a.splice(b, 1)[0], c = a.splice(c, 1)[0]) : (c = a.splice(c, 1)[0], b = a.splice(b, 1)[0]) : d > f ? (b = a.splice(d, 1)[0], c = a.splice(f, 1)[0]) : (c = a.splice(f, 1)[0], b = a.splice(d, 1)[0]);
        return [{
            g: J.g.gb(b.g),
            ha: [b]
        },
            {
                g: J.g.gb(c.g),
                ha: [c]
            }]
    },
    JF: function(a, b, c) {
        for (var d = J.je.wj(b.g[2] - b.g[0], b.g[3] - b.g[1], b.ha.length + 1), f = J.je.wj(c.g[2] - c.g[0], c.g[3] - c.g[1], c.ha.length + 1), g, h, k, l = a.length - 1; 0 <= l; l -= 1) {
            var m = a[l],
                n = [b.g[0] < m.g[0] ? b.g[0] : m.g[0], b.g[2] > m.g[2] ? b.g[2] : m.g[2], b.g[1] < m.g[1] ? b.g[1] : m.g[1], b.g[3] > m.g[3] ? b.g[3] : m.g[3]],
                n = Math.abs(J.je.wj(n[1] - n[0], n[3] - n[2], b.ha.length + 2) - d),
                m = [c.g[0] < m.g[0] ? c.g[0] : m.g[0], c.g[2] > m.g[2] ? c.g[2] : m.g[2], c.g[1] < m.g[1] ? c.g[1] : m.g[1], c.g[3] > m.g[3] ? c.g[3] : m.g[3]],
                m = Math.abs(J.je.wj(m[1] - m[0], m[3] - m[2], c.ha.length + 2) - f),
                q = Math.abs(m - n);
            if (!h || !g || q < g) h = l,
                g = q,
                k = m < n ? c: b
        }
        d = a.splice(h, 1)[0];
        b.ha.length + a.length + 1 <= this.Fm ? (b.ha.push(d), J.g.extend(b.g, d.g)) : c.ha.length + a.length + 1 <= this.Fm ? (c.ha.push(d), J.g.extend(c.g, d.g)) : (k.ha.push(d), J.g.extend(k.g, d.g))
    },
    remove: function(a, b) {
        var c = [];
        c[0] = {
            g: a
        }; (c[1] = b) || (c[1] = !1);
        c[2] = this.Pm;
        this.count -= 1;
        if (!1 === c[1]) {
            var d = 0,
                f = [];
            do d = f.length,
                f = f.concat(this.Mw.apply(this, c));
            while (d !== f.length);
            return f
        }
        return this.Mw.apply(this, c)
    },
    Mw: function(a, b, c) {
        var d = [],
            f = [],
            g = [];
        if (!a || !J.g.Ye(a.g, c.g)) return g;
        a = J.g.gb(a.g);
        var h;
        f.push(c.ha.length);
        d.push(c);
        do {
            c = d.pop();
            var k = f.pop() - 1;
            if ("undefined" !== typeof b) for (; 0 <= k;) {
                var l = c.ha[k];
                if (J.g.Ye(a, l.g)) if (b && "undefined" !== typeof l.ai && l.ai === b || !b && ("undefined" !== typeof l.ai || J.g.Du(a, l.g))) {
                    "undefined" !== typeof l.ha ? (g = this.tj(l, !0, [], l), c.ha.splice(k, 1)) : g = c.ha.splice(k, 1);
                    J.je.Aq(c);
                    b = void 0;
                    c.ha.length < this.Fm && (h = this.tj(c, !0, [], c));
                    break
                } else "undefined" !== typeof l.ha && (f.push(k), d.push(c), c = l, k = l.ha.length);
                k -= 1
            } else if ("undefined" !== typeof h) {
                c.ha.splice(k + 1, 1);
                0 < c.ha.length && J.je.Aq(c);
                k = 0;
                for (l = h.length; k < l; k += 1) this.zv(h[k], c);
                h.length = 0;
                0 === d.length && 1 >= c.ha.length ? (h = this.tj(c, !0, h, c), c.ha.length = 0, d.push(c), f.push(1)) : 0 < d.length && c.ha.length < this.Fm ? (h = this.tj(c, !0, h, c), c.ha.length = 0) : h = void 0
            } else J.je.Aq(c)
        } while ( 0 < d . length );
        return g
    },
    search: function(a, b) {
        return this.tj({
                g: a
            },
            !1, [], this.Pm, b)
    },
    vG: function(a, b) {
        return this.tj({
                g: a
            },
            !1, [], this.Pm, b, !0)
    },
    tj: function(a, b, c, d, f, g) {
        var h = {},
            k = [];
        if (!J.g.Ye(a.g, d.g)) return c;
        k.push(d.ha);
        do {
            d = k.pop();
            for (var l = d.length - 1; 0 <= l; l -= 1) {
                var m = d[l];
                if (J.g.Ye(a.g, m.g)) if ("undefined" !== typeof m.ha) k.push(m.ha);
                else if ("undefined" !== typeof m.ai) if (b) c.push(m);
                else if ("undefined" === typeof f || m.type === f) m = m.ai,
                    "undefined" !== typeof g ? h[J.e.Cb(m)] = m: c.push(m)
            }
        } while ( 0 < k . length );
        return "undefined" !== typeof g ? h: c
    }
});
J.je.Aq = function(a) {
    var b = a.ha.length,
        c = a.g;
    if (0 === b) J.g.empty(c);
    else {
        var d = a.ha[0].g;
        c[0] = d[0];
        c[2] = d[2];
        c[1] = d[1];
        c[3] = d[3];
        for (d = 1; d < b; d += 1) J.g.extend(c, a.ha[d].g)
    }
};
J.je.wj = function(a, b, c) {
    var d = (a + b) / 2;
    a *= b;
    return a * c / (a / (d * d))
};